//引入封装的reuest请求
const {
  request
} = require('./request.js');
const GET = 'GET';
const POST = 'POST';
const PUT = 'PUT';
const FORM = 'FORM';
const DELETE = 'DELETE';

//基于业务封装的接口
module.exports = {
  checkToken: () => {
    return request('user/checkToken', GET, '')
  },
  getUserInfo: () => {
    return request('user', GET, '')
  },
  //
  updateUserNick: (userNick) => {
    return request('user/updateNick', POST, userNick)
  },
}